import request from './request'
export function search(data) {
    return request({
        url: 'share/platform-service/role/search',
        method: 'post',
        data
    })
}

export function deleteData(data) {
    return request({
        url: 'share/platform-service/role',
        method: 'delete',
        data
    })
}

export function getById(params) {
    return request({
        url: 'share/platform-service/role/permission/'+params,
    })
}

export function saveOrUpdate(data,action) {
    return request({
        url: 'share/platform-service/role/'+action,
        method: 'post',
        data
    })
}
export function getRoleTree() {
    return request({
        url: 'share/platform-service/role/getRoleTree',
    })
}

export function refreshAuth() {
    return request({
        url: 'share/platform-service/refreshRouterPermission',
    })
}